package com.hfzy.ihk.web.aliyuncall.serviceImpl;

import com.alibaba.dubbo.config.annotation.Service;
import com.hfzy.ihk.facade.aliyuncall.service.AliyunCallService;
import com.hfzy.ihk.web.aliyuncall.biz.ClickCallBiz;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

/**
 * websocket 调用的rmi
 */
@Service(version = "1.0.0")
public class AliyunCallServiceImpl implements AliyunCallService {

    @Autowired
    ClickCallBiz clickCallBiz;


    /**
     * 呼出
     * @param mainCallPhone
     * @param targetCallPhone
     * @param machineFrom
     * @param createUserId
     * @param dataId
     * @param whereFrom
     * @param pageFrom
     * @param mainCallType
     * @param commitTo
     * @param city
     * @param customerName
     * @param showNum
     * @param project
     * @param propertyNo
     * @param objectId
     * @param sessionId
     * @return
     */
    @Override
    public Map<String, String> handleClickCallWebSocket(String mainCallPhone, String targetCallPhone, String machineFrom, String createUserId,
                                                        String dataId, String whereFrom, String pageFrom, String mainCallType,
                                                        String commitTo, String city, String customerName, String showNum,
                                                        String project, String propertyNo, String objectId, String sessionId,String callTaskId,String packageId) {
        return clickCallBiz.handleClickCallWebSocket(mainCallPhone,targetCallPhone,machineFrom,createUserId,dataId,whereFrom,
                pageFrom,mainCallType,commitTo,city,customerName,showNum,project,propertyNo,objectId,sessionId, callTaskId,packageId);
    }

    /**
     * 呼出 ASR 智能外呼呼出
     * @param mainCallPhone
     * @param targetCallPhone
     * @param machineFrom
     * @param createUserId
     * @param dataId
     * @param whereFrom
     * @param pageFrom
     * @param mainCallType
     * @param commitTo
     * @param city
     * @param customerName
     * @param showNum
     * @param project
     * @param propertyNo
     * @param objectId
     * @param sessionId
     * actionCodeBreak 开场白是否可以打断
     * voiceCode  开场白录音文件id
     * @return
     */
    public Map<String, String> handleAsrClickCallWebSocket(String mainCallPhone, String targetCallPhone, String machineFrom, String createUserId,
                                                           String dataId, String whereFrom, String pageFrom, String mainCallType,
                                                           String commitTo, String city, String customerName, String showNum,
                                                           String project, String propertyNo, String objectId, String sessionId,String callTaskId,String packageId,String actionCodeBreak,String voiceCode,String voiceText,String company){
        return clickCallBiz.handleAsrClickCallWebSocket(mainCallPhone,machineFrom,createUserId,dataId,whereFrom,
                pageFrom,commitTo,city,customerName,showNum,project,propertyNo,objectId,sessionId, callTaskId,packageId,actionCodeBreak,voiceCode,voiceText,company);
    }


}
